#ifndef _PAGE_INIT_HPP
#define _PAGE_INIT_HPP

void pageInit();

void pageInit() {
	lv_obj_t *root = lv_scr_act();
	lv_obj_set_style_bg_color(root, LV_COLOR_MAIN_BG_2, 0);
	// lv_obj_t *root = lv_obj_create(lv_scr_act());
	// lv_obj_remove_style_all(root);
	// lv_obj_set_size(root, CONFIG_SCREEN_WIDTH, CONFIG_SCREEN_HEIGHT);
	// lv_obj_set_scrollbar_mode(root, LV_SCROLLBAR_MODE_OFF);

	lv_obj_t *statusBody = lv_obj_create(root);
	lv_obj_remove_style_all(statusBody);
	lv_obj_set_style_bg_color(statusBody, LV_COLOR_MAIN_BG_1, 0);
	lv_obj_set_style_bg_opa(statusBody, LV_OPA_COVER, 0);
	lv_obj_set_size(statusBody, CONFIG_SCREEN_WIDTH, CONFIG_TOP_STATUS_BAR_HEIGHT + 10);
	statusBarInit(statusBody);

	pageMain = lv_obj_create(root);
	lv_obj_remove_style_all(pageMain);
	lv_obj_set_style_radius(pageMain, 10, 0);
	lv_obj_set_style_bg_color(pageMain, LV_COLOR_MAIN_BG_2, 0);
	lv_obj_set_style_bg_opa(pageMain, LV_OPA_COVER, 0);
	lv_obj_set_pos(pageMain, 0, CONFIG_TOP_STATUS_BAR_HEIGHT);
	// lv_obj_set_size(pageMain, CONFIG_SCREEN_WIDTH, CONFIG_SCREEN_HEIGHT - CONFIG_TOP_STATUS_BAR_HEIGHT + 10);
	lv_obj_set_size(pageMain, CONFIG_SCREEN_WIDTH, CONFIG_SCREEN_HEIGHT - CONFIG_TOP_STATUS_BAR_HEIGHT);
}
#endif